﻿namespace xWF.Examples.Tkmv.Transitions
{
    class ExcelImportButton : TkmvButtonTransitions
    {
        public ExcelImportButton()
        {
            Title = "Открыть в Excel";
            Icon = "icon-download-alt";
        }

        public override bool CanExecute(TkmvWorkItem workItem)
        {
            return true;
        }

        protected override void OnExecute(TkmvWorkItem workItem)
        {
            Redirect = string.Format("ExcelDownload.aspx?Id={0}", workItem.TkmvId);
        }
    }
}
